package com.byl.modules.core.controller.web;


import com.byl.common.modules.controller.BaseController;
import com.byl.modules.core.service.ProductService;
import com.byl.sdk.bean.ResultBean;
import com.byl.sdk.utils.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


@RestController
@RequestMapping("/wx/product")
public class WxProductController extends BaseController {

    @Autowired
    ProductService productService;

    @PostMapping("/list")
    public String Wxquery(@RequestBody Map map) {
        ResultBean bean = productService.queryWx(map);
        return success("移动端产品列表", bean);
    }

    @GetMapping ("/get")
    public String queryDetail(String id) {
        Map map = productService.get(id);
        return success("产品详情",map);
    }
}